*** Settings ***
Documentation           通过cli获取内存的DeviceLocator
Resource                ../../test_function/cli/ssh.robot
Resource                ../../test_function/resource.robot
Suite Setup             Open SSH Connection
Suite Teardown          Close SSH Session    ${ssh}

*** Variables ***
${service}              bmc.kepler.compute
${path}                 /bmc/kepler/Systems/${SYSTEM_ID}/Memory/Memory_1_01010117
${interface}            bmc.kepler.Systems.Memory
${property}             DeviceLocator
${input}                ${BUSCTL_GET} ${service} ${path} ${interface} ${property}
${expected_output}      DIMM000

*** Test Cases ***
Get DeviceLocator Info Via cli
    [Documentation]    通过ssh查询内存的DeviceLocator信息
    [Tags]    Get_DeviceLocator_Info_Via_cli

    ${rsp}=    Execute SSH Command    ${ssh}    ${input}
    Should Not Be Empty    ${rsp}    msg=未获取DeviceLocator信息
    Log    DeviceLocator信息: \n${rsp}    console=False
    Should Contain    ${rsp}    ${expected_output}    msg=未找到DeviceLocator信息
